package com.liguo.whoisthespy.bean
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
import io.realm.annotations.RealmClass
import java.io.Serializable

/**
 *
 * Created by Extends on 2017/6/15 15:08
 */
/**
 * 测试玩,无用
 */

/**
 *  词语表
 */
open class WordsTbl : RealmObject(),Serializable{
    @PrimaryKey var id :Int = 0//主键 id
    var civilian : String = ""//平民词
    var undercover:String = ""//卧底词
    var played:Boolean = false//是否玩过这组词

}

/**
 * 用户表
 */
open class UserTbl:RealmObject(),Serializable{
    @PrimaryKey  var id :Int = 0 //主键id
    var name : String =""//玩家姓名,唯一性
    var win : Int = 0//胜场次数
    var defeat : Int = 0//败场次数
}

/**
 * 用户实体类
 */
data class UserBean(
        val user:UserTbl,
        var check:Boolean = false,//是否选择
        var death:Boolean = false,//是否出局
        var ciyu:String = "",//玩家当前词语
        var isSpy:Boolean=false//是否是卧底
):Serializable

/**
 * 各种封装类
 */
class LoadSerializableBean:Serializable{
    var listUserBean:List<UserBean>?=null
}

